package com.ruoyi.pims.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pims.mapper.InventoryCheckItemsMapper;
import com.ruoyi.pims.domain.InventoryCheckItems;
import com.ruoyi.pims.service.IInventoryCheckItemsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 库存盘点明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-17
 */
@Service
public class InventoryCheckItemsServiceImpl implements IInventoryCheckItemsService 
{
    @Autowired
    private InventoryCheckItemsMapper inventoryCheckItemsMapper;

    /**
     * 查询库存盘点明细
     * 
     * @param itemId 库存盘点明细主键
     * @return 库存盘点明细
     */
    @Override
    public InventoryCheckItems selectInventoryCheckItemsByItemId(Long itemId)
    {
        return inventoryCheckItemsMapper.selectInventoryCheckItemsByItemId(itemId);
    }

    /**
     * 查询库存盘点明细列表
     * 
     * @param inventoryCheckItems 库存盘点明细
     * @return 库存盘点明细
     */
    @Override
    public List<InventoryCheckItems> selectInventoryCheckItemsList(InventoryCheckItems inventoryCheckItems)
    {
        return inventoryCheckItemsMapper.selectInventoryCheckItemsList(inventoryCheckItems);
    }

    /**
     * 新增库存盘点明细
     * 
     * @param inventoryCheckItems 库存盘点明细
     * @return 结果
     */
    @Override
    public int insertInventoryCheckItems(InventoryCheckItems inventoryCheckItems)
    {
        return inventoryCheckItemsMapper.insertInventoryCheckItems(inventoryCheckItems);
    }

    /**
     * 修改库存盘点明细
     * 
     * @param inventoryCheckItems 库存盘点明细
     * @return 结果
     */
    @Override
    public int updateInventoryCheckItems(InventoryCheckItems inventoryCheckItems)
    {
        return inventoryCheckItemsMapper.updateInventoryCheckItems(inventoryCheckItems);
    }

    /**
     * 批量删除库存盘点明细
     * 
     * @param itemIds 需要删除的库存盘点明细主键
     * @return 结果
     */
    @Override
    public int deleteInventoryCheckItemsByItemIds(String itemIds)
    {
        return inventoryCheckItemsMapper.deleteInventoryCheckItemsByItemIds(Convert.toStrArray(itemIds));
    }

    /**
     * 删除库存盘点明细信息
     * 
     * @param itemId 库存盘点明细主键
     * @return 结果
     */
    @Override
    public int deleteInventoryCheckItemsByItemId(Long itemId)
    {
        return inventoryCheckItemsMapper.deleteInventoryCheckItemsByItemId(itemId);
    }
}
